package org.stvd.entities.common;
import org.stvd.entities.base.BaseEntity;

/**
 * 验证信息临时表主键
 * @author houzx
 */
public class VerifyTmpPK extends BaseEntity{

    private static final long serialVersionUID = -7206390149065900811L;
    
    /**
     * 需要验证的邮箱或手机号
     */
    private String verifyId = "";
    
    /**
     * 验证码用途：00-注册；01-绑定；02-重置密码；
     */
    private String useFor = "";
    
    public VerifyTmpPK() {}
    /**
     * 验证信息临时表主键构造方法
     * @param verifyId 需要验证的邮箱或手机号
     * @param useFor 验证码用途：00-注册；01-绑定；02-重置密码；
     */
    public VerifyTmpPK(String verifyId, String useFor) {
        this.verifyId = verifyId;
        this.useFor = useFor;
    }
    
    public String getVerifyId() {
        return verifyId;
    }
    public void setVerifyId(String verifyId) {
        this.verifyId = verifyId;
    }
    public String getUseFor() {
        return useFor;
    }
    public void setUseFor(String useFor) {
        this.useFor = useFor;
    }
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((useFor == null) ? 0 : useFor.hashCode());
        result = prime * result
                + ((verifyId == null) ? 0 : verifyId.hashCode());
        return result;
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        VerifyTmpPK other = (VerifyTmpPK) obj;
        if (useFor == null) {
            if (other.useFor != null)
                return false;
        } else if (!useFor.equals(other.useFor))
            return false;
        if (verifyId == null) {
            if (other.verifyId != null)
                return false;
        } else if (!verifyId.equals(other.verifyId))
            return false;
        return true;
    }
}
